#ifndef CACHEDIMAGEPROVIDER_H
#define CACHEDIMAGEPROVIDER_H

#include <QQuickImageProvider>
#include <QPixmap>
#include <QHash>

class CachedImageProvider : public QQuickImageProvider
{
public:
    explicit CachedImageProvider();

    QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);

    void cache(const QStringList &pixmaps);
    void remove(const QString &pix);
    void add(const QString &pix);
    
signals:
    
public slots:

private:
    QHash<QString, QPixmap> mCache;
};

#endif // CACHEDIMAGEPROVIDER_H
